<h1>中心上课记录</h1>

<table>
  <thead>
    <tr>
      <th>ID</th>
      <th>琴房</th>
      <th>学生</th>
      <th>教师</th>
      <th>时间</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
    <% @attendences.each do |attendence| %>
      <tr>
        <td><%= attendence.id %></td>
        <td><%= attendence.room.name %></td>
        <td><%= attendence.student.name %></td>
        <td><%= attendence.teacher.name %></td>
        <td><%= attendence.attendtime %></td>
        <td><%= link_to '编辑', :action => 'edit', :id=> attendence%> | <%= link_to '删除', :action => 'destroy', :id => attendence, :confirm => '确定删除?' %></td>
      </tr>
    <% end %>
  </tbody>
</table>
